package com.kyh.sys.entity;

import java.util.Date;

import javax.persistence.Table;

import com.kyh.annotation.Model;
import com.kyh.entity.base.BaseEntity;

/**
*/
@Table(name="sys_role_menu", catalog="role_menu_id")
public class RoleMenu extends BaseEntity<RoleMenu> {

	@Model(nameTable="roleMenuId")
	private Long roleMenuId; // 主键ID
	@Model(nameTable="roleId")
	private Long roleId; // 角色ID
	@Model(nameTable="menuId")
	private Long menuId; // 菜单ID
	@Model(nameTable="status")
	private Integer status; // 
	@Model(nameTable="createTime",type=Model.TYPE.DATE, format="yyyy-MM-dd HH:mm:ss")
	private Date createTime; // 
	@Model(nameTable="updateTime",type=Model.TYPE.DATE, format="yyyy-MM-dd HH:mm:ss")
	private Date updateTime; // 

	public Long getRoleMenuId() {
		return roleMenuId;
	}
	public RoleMenu setRoleMenuId(Long roleMenuId) {
		this.roleMenuId = roleMenuId;
		return this;
	}
	public Long getRoleId() {
		return roleId;
	}
	public RoleMenu setRoleId(Long roleId) {
		this.roleId = roleId;
		return this;
	}
	public Long getMenuId() {
		return menuId;
	}
	public RoleMenu setMenuId(Long menuId) {
		this.menuId = menuId;
		return this;
	}
	public Integer getStatus() {
		return status;
	}
	public RoleMenu setStatus(Integer status) {
		this.status = status;
		return this;
	}
	public Date getCreateTime() {
		return createTime;
	}
	public RoleMenu setCreateTime(Date createTime) {
		this.createTime = createTime;
		return this;
	}
	public Date getUpdateTime() {
		return updateTime;
	}
	public RoleMenu setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
		return this;
	}

	public static RoleMenu roleMenu(
			Long roleId,
			Long menuId,
			Integer status
			) {
		RoleMenu entity = new RoleMenu();
		entity.setRoleId(roleId);
		entity.setMenuId(menuId);
		entity.setStatus(status);
		return entity;
	}
}